package com.bristua.barcode.supplier.biz;

import com.bristua.barcode.supplier.dao.TChannelRequestConfigMapper;
import com.bristua.barcode.supplier.model.TChannelRequestConfig;
import com.bristua.barcode.supplier.model.condition.TChannelRequestConfigExample;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * Created by Administrator on 2019/9/15.
 */
@Service
public class QueryChannelRequestConfigBiz {

    @Resource
    private TChannelRequestConfigMapper tChannelRequestConfigMapper;

    public TChannelRequestConfig queryChannelRequestConfig(String channelId){
        TChannelRequestConfigExample tChannelRequestConfigExample = new TChannelRequestConfigExample();
        tChannelRequestConfigExample.createCriteria().andChannelIdEqualTo(channelId);
        List<TChannelRequestConfig> tChannelRequestConfigs = tChannelRequestConfigMapper.selectByExampleWithBLOBs(tChannelRequestConfigExample);
        if(tChannelRequestConfigs!=null && tChannelRequestConfigs.size()>0){
            return tChannelRequestConfigs.get(0);
        }
        return null;
    }
}
